package org.example.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.example.entity.Offermanagementtable;
import org.example.mapper.OffermanagementtableMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OffermanagementtableService extends ServiceImpl<OffermanagementtableMapper, Offermanagementtable> {
    public List<Offermanagementtable> findByStatus(String status, String intendedPosition, String deptName) {
        return baseMapper.findByStatus(status, intendedPosition, deptName);
    }

    public List<Offermanagementtable> findAllStatus(String status, String intendedPosition, String deptName) {
        return baseMapper.findAllStatus(status, intendedPosition, deptName);
    }

    // 升序
    public List<Offermanagementtable> findByStatusAsc(String status, String intendedPosition, String deptName) {
        return baseMapper.findByStatusAsc(status, intendedPosition, deptName);
    }

    // 降序
    public List<Offermanagementtable> findByStatusDesc(String status, String intendedPosition, String deptName) {
        return baseMapper.findByStatusDesc(status, intendedPosition, deptName);
    }



    // offer跟进升序
    public List<Offermanagementtable> moreAdvancedStatusAscendingOrder(String status, String intendedPosition, String deptName) {
        return baseMapper.moreAdvancedStatusAscendingOrder(status, intendedPosition, deptName);
    }
    //offer跟进降序
    public List<Offermanagementtable> followUpOnTheDescendingOrderOfStatus(String status, String intendedPosition, String deptName) {
        return baseMapper.followUpOnTheDescendingOrderOfStatus(status, intendedPosition, deptName);
    }
   public Offermanagementtable findByResumeId(@Param("applicanId") String applicanId){
        return baseMapper.findByResumeId(applicanId);
    }

    public List<Offermanagementtable> OfferWithCandidateResultMap(@Param("candidateId") String candidateId){
        return baseMapper.OfferWithCandidateResultMap(candidateId);
    }
    public  List<Offermanagementtable> getOfferWithCandidateAndDept(@Param("offerId") String offerId){
        return baseMapper.getOfferWithCandidateAndDept(offerId);
    }
    public  List<Offermanagementtable> selectByOfferStatus(@Param("offerStatus") String offerStatus){
        return baseMapper.selectByOfferStatus(offerStatus);
    }
}
